/** Admin */
package domain.admin;

import org.json.JSONObject;

import domain.user.SystemUser;
import domain.utils.JSONUtils;

/** 
 * This class can do anything except edit Doctors Orders 
 * @author Will Stansfield
 * @version 1.0
 * */
public class Admin extends SystemUser {
	
	/** Creates an admin from a jsonobject
	 *  @param json jsonObject
	 */
	public Admin(final JSONObject json) {
		super(json);
		populateFromJSON(json);
	}
	
	/** Creates an admin
	 * @param nameFirst first name
	 * @param nameMiddle middle name
	 * @param nameLast last name
	 */
	public Admin(String nameFirst, String nameMiddle, String nameLast){
		super(nameFirst, nameLast, nameMiddle);
	}
	
	/** returns the json object's toString 
	 * @return json object's toString
	 */
	public String toString() {
		return getJSON().toString();
	}
	
	/** creates a jsonObject from the Admin
	 * @return JSONObject made
	 */
	public JSONObject getJSON() {
		final JSONObject json = new JSONObject();
		return JSONUtils.merge(json, super.getJSON());
	}

}
